<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ include file="datalink.jsp" %>
    <html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-utf-8">
        <title>check</title>
        <style>
            #a {
            width:50%;
            height:100%;
            margin-left:25%;
            border: 1px dashed ;
            background-color:rgba(46, 184, 194, 0.397);
            text-align:center;
            }
            body{
                text-align:center;
                background-color:lightblue;
            }
            #ku {
            width:19%;
            height:50px;
            border: 1px dashed ;
            background-color:rgba(46, 184, 194, 0.397);
            text-align:center;
            float: left;
            }
        </style>
        </head>
        <body>
        <div id="a">
        <form method="post" action="">
        <% 
            Statement st = null;
           Statement ct = null;
           st = conn.createStatement();
           ct = conn.createStatement();
           String tno=request.getParameter("tno");
           String exet="SELECT * FROM teacherclass where tno ='"+tno+"';";
           String exec=null;
           ResultSet rs = null;  
           rs = st.executeQuery(exet);
           %><div>
            <div id="ku" style="color: crimson;"><b><%out.print("课序号");%></b></div>
            <div id="ku" style="color: crimson;"><b><%out.print("课程名");%></b></div>
            <div id="ku" style="color: crimson;"><b><%out.print("教室");%></b></div>
            <div id="ku" style="color: crimson;"><b><%out.print("授课老师");%></b></div>
            <div id="ku" style="color: crimson;"><b><%out.print("上课日期");%></b></div>
        </div><%
           while (rs.next()){
               String cno=rs.getString(2);
               exec="SELECT * FROM class where cno ='"+cno+"';";
               ResultSet cs = null;
               cs=ct.executeQuery(exec);
               while (cs.next()){
                out.print("");
                %><div>
                <div id="ku"><%out.print(cs.getString(1));%> </div>
                <div id="ku"><%out.print(cs.getString(2));%> </div>
                <div id="ku"><%out.print(cs.getString(3));%> </div>
                <div id="ku"><%out.print(cs.getString(4));%> </div>
                <div id="ku"><%out.print(cs.getString(5));%> </div>
            </div><%
               }
           }

        %>
        </form>
        <button onclick="window.location.href='./srls.jsp'" type="button" id="add" >返回</button>
        </div>
        </body>
        </html>